mixin formGroup(label, name, type, description)
    .form-group
        label.control-label.col-md-2 #{label}
        .col-md-4
            input.form-control#username(name=name, type=type)
            if description
                p.help-block #{description}

mixin formGroupSubmit(value)
    .form-group
        .col-md-4.col-md-offset-2
            input.btn.btn-primary(type='submit', value=value)

mixin formPage(title, groups, submit)
    h3= title
    hr
    form.form-horizontal(method='post')
        each item in groups
            +formGroup(item.label, item.name, item.type, item.description)
        +formGroupSubmit(submit)

doctype html
html
    head
        meta(charset='utf-8')
        meta(http-equiv="X-UA-Compatible", content="IE=edge")
        meta(name="viewport", content="width=device-width initial-scale=1")
        title=title + ' - Microblog'
        link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
        link(rel='stylesheet', href='/stylesheets/bootstrap-theme.min.css')
        link(rel='stylesheet', href='./stylesheets/jumbotrom.css')
        link(rel='stylesheet', href='./stylesheets/microblog.css')
    body
        include nav
        block content
        include footer
        script(src='./javascripts/jquery.min.js')
        script(src='./javascripts/bootstrap.min.js')
        block script